//===============================================================================
// Microsoft Architecture Strategy Team
// LitwareHR - SaaS Sample Application
//===============================================================================
// Copyright  Microsoft Corporation.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===============================================================================
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
//===============================================================================


using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Shp.Runtime.Sitka.ServiceGateway.CloudDB;
using Shp.Runtime.Sitka.ServiceAgent;
using Shp.Runtime.DataModel.Sitka.Tests.Mocks;
using Shp.Runtime.Contract;

namespace Shp.Runtime.DataModel.Sitka.Tests
{
	/// <summary>
	/// Summary description for PositionServicesFixture
	/// </summary>
	[TestClass]
	public class PositionServicesFixture
	{
		private const string AuthorityIdTest = "StratusAuthority";
		private const string ContainerIdTest = "eugeniop.tenant4";

        private static Tenant tenantMock;
		private const string ENTITYDEFNAME = "position";

		public PositionServicesFixture()
		{
		}

		[ClassInitialize()]
		public static void Initialize(TestContext context)
		{
			tenantMock = Mocks.TenantMock.GetTenant();
		}

		#region Additional test attributes
		//
		// You can use the following additional attributes as you write your tests:
		//
		// Use ClassInitialize to run code before running the first test in the class
		// [ClassInitialize()]
		// public static void MyClassInitialize(TestContext testContext) { }
		//
		// Use ClassCleanup to run code after all tests in a class have run
		// [ClassCleanup()]
		// public static void MyClassCleanup() { }
		//
		// Use TestInitialize to run code before running each test 
		// [TestInitialize()]
		// public void MyTestInitialize() { }
		//
		// Use TestCleanup to run code after each test has run
		// [TestCleanup()]
		// public void MyTestCleanup() { }
		//
		#endregion

		[TestMethod()]
		public void ShouldAddInstance()
		{
			

			//PositionServices proxy = new PositionServices();
			//Guid result = proxy.AddInstance(tenantMock.Id, ENTITYDEFNAME, Mocks.PositionMock.GetMockEntityFields().ToArray());


            //Assert.IsNotNull(result, "Guid Null");

            //if (result == Guid.Empty)
            //{
            //    Assert.Fail("Guid Null");
            //}
		}

		[TestMethod]
		public void ShouldGetInstanceList()
        {            		
			StringPair[][] sitkaFields;

            //PositionServices proxy = new PositionServices();

			//Guid instanceId = proxy.AddInstance(tenantMock.Id, ENTITYDEFNAME, Mocks.PositionMock.GetMockEntityFields().ToArray());

			List<Guid> listGuid = new List<Guid>();
            //listGuid.Add(instanceId);

            //sitkaFields = proxy.GetInstanceList(tenantMock.Alias, ENTITYDEFNAME, listGuid.ToArray());

            //Assert.IsNotNull(sitkaFields, "Give Null");

            //if (sitkaFields.Length == 0)
            //{
            //    Assert.Fail("The returned List is empty...");
            //}
        }
	}
}

